import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/documentation/policy/getList',
    method: 'post',
    data: query
  })
}
export function getInfoByPolicy(policy) {
  return request({
    url: '/documentation/policy/filter',
    method: 'post',
    data: policy
  })
}
export function getPolicyMechanism() {
  return request({
    url: '/documentation/policy/mechanism',
    method: 'post'
  })
}

export function getPolicyCategory() {
  return request({
    url: '/documentation/policy/category',
    method: 'post'
  })
}

export function getPolicy(id) {
  return request({
    url: '/documentation/policy/getDetail',
    method: 'post',
    data: id
  })
}

export function changePolicyStatusByID(pv) {
  return request({
    url: '/documentation/policy/change-status',
    method: 'post',
    data: pv
  })
}

export function removePolicyByID(pv) {
  return request({
    url: '/documentation/policy/delete',
    method: 'post',
    data: pv
  })
}

export function savePolicy(data) {
  return request({
    url: '/documentation/policy/save',
    method: 'post',
    data: data
  })
}
